package com.itheima_4;

import java.util.concurrent.ArrayBlockingQueue;

public class Demo {
    public static void main(String[] args) throws InterruptedException {
        /*ArrayBlockingQueue<String> abq=new ArrayBlockingQueue<>(1);
        abq.put("汉堡包");
        System.out.println(abq.take());
        System.out.println(abq.take());*/
        ArrayBlockingQueue<String> abq=new ArrayBlockingQueue<>(1);
        Cooker c=new Cooker(abq);
        Foodie f=new Foodie(abq);
        c.start();
        f.start();
    }
}
